package com.ruoyi.project.sdi.sdiDocDefine.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.sdi.sdiDocDefine.mapper.SdiDocDefineMapper;
import com.ruoyi.project.sdi.sdiDocDefine.domain.SdiDocDefine;
import com.ruoyi.project.sdi.sdiDocDefine.service.ISdiDocDefineService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 票据类型Service业务层处理
 *
 * @author XQ.XU
 * @date 2020-03-20
 */
@Service
public class SdiDocDefineServiceImpl extends ServiceImpl<SdiDocDefineMapper, SdiDocDefine> implements ISdiDocDefineService
{
    @Autowired
    private SdiDocDefineMapper sdiDocDefineMapper;

    /**
     * 查询票据类型
     *
     * @param id 票据类型ID
     * @return 票据类型
     */
    @Override
    public SdiDocDefine selectSdiDocDefineById(String id)
    {
        return sdiDocDefineMapper.selectSdiDocDefineById(id);
    }

    /**
     * 查询票据类型列表
     *
     * @param sdiDocDefine 票据类型
     * @return 票据类型
     */
    @Override
    public List<SdiDocDefine> selectSdiDocDefineList(SdiDocDefine sdiDocDefine)
    {
        return sdiDocDefineMapper.selectSdiDocDefineList(sdiDocDefine);
    }

    /**
     * 新增票据类型
     *
     * @param sdiDocDefine 票据类型
     * @return 结果
     */
    @Override
    public int insertSdiDocDefine(SdiDocDefine sdiDocDefine)
    {
        return sdiDocDefineMapper.insertSdiDocDefine(sdiDocDefine);
    }

    /**
     * 修改票据类型
     *
     * @param sdiDocDefine 票据类型
     * @return 结果
     */
    @Override
    public int updateSdiDocDefine(SdiDocDefine sdiDocDefine)
    {
        return sdiDocDefineMapper.updateSdiDocDefine(sdiDocDefine);
    }

    /**
     * 删除票据类型对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSdiDocDefineByIds(String ids)
    {
        return sdiDocDefineMapper.deleteSdiDocDefineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除票据类型信息
     *
     * @param id 票据类型ID
     * @return 结果
     */
    @Override
    public int deleteSdiDocDefineById(String id)
    {
        return sdiDocDefineMapper.deleteSdiDocDefineById(id);
    }
}
